<?php
$db = new Database;
$form_id = $_POST['form_id'];
$form_query = $db->query("SELECT * FROM tbform WHERE id = '$form_id'","row");
echo form_extract($form_query['form_title'],$form_query['description'],$form_query['label_placement']);
$field_query = $db->query("SELECT * FROM tbfield_output WHERE form_id='$form_id'","array");
foreach($field_query as $form_row){
    echo $form_row['fof']($form_row['f_label'],$form_row['f_size'],$form_row['options'],$form_row['sft'],$form_row['f_layout'],$form_row['name_format'],$form_row['lb_desc'],$form_row['f_type'],$form_row['id']);
}
?>
<div class="span4" style="margin-top: 10px;"><input type="button" class="btn saveUserForm" value="Submit"></div>